<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>顺风车---<s:property value="key" escape="false"></s:property>&nbsp;&nbsp;搜索结果</title>
<link href="${ctx}/css/panels.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/index-css/list.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function addToFavorlist(productId,productType){
	var user = "<s:property value='#session.niagara_security_session_login'/>";
	if(user == ""){
		alert("您还没有登录！");
		window.location = "${ctx}/login.action";
		return;
	}
	if(productType == "user"){
		url= "${ctx}/home/friends!add.action";
		$.post(url,
			   {addUserId:productId},
		       function(data,status){
			       if(data==""){
				       alert("此用户已经加为您关注的好友！");
			       }else{
				       alert(data);
			       }			       
			   },'text'
		);
	}
	if(productType == "book"){
		url= "${ctx}/home/favorite-book!add.action";
		$.post(url,
			   {bookId:productId},
		       function(data,status){
			       if(data==""){
				       alert("此书已经加入到您的收藏夹中！");
			       }else{
				       alert(data);
			       }
			   },'text'
		);
	}
};
function addToShoppingCart(productId,quantity){
	url= "${ctx}/shop/shopping-cart!add.action";
	$.post(url,
		   {productId:productId,quantity:quantity},
	       function(data,status){
		       var flag = confirm("已经加入到了购物车中！\n去购物车中查看？");
		       if(flag){
			       document.location.href = "${ctx}/shop/shopping-cart.action";
			   }
		   },'html'
	);
}

</script>
</head>
<body>

<div class="your_position">您现在的位置：<a name="linkHome" href="${ctx}">顺风车</a> &gt;&gt; <a href='#' name='linkCategoryNavi'>二手交易</a> &gt;&gt; <a href='#' name='linkCategoryNavi'>二手自行车</a> &gt;&gt; <span>捷安特</span></div>
<div class="list">
  <div class="list_left">
    <div class="orangePanel">
 	 <h3><a href="#" class="titleLink" title="浏览同级分类">浏览同级分类</a></h3>
 	 <div class="box">
      <ul>
        <li>
          <div>
            <div class='second_fenlei'>&middot;</div>
            <div  class='second_fenlei2'><a name='linkCategory' href="#">捷安特（95）</a></div>
          </div>
        </li>
        <div class='clear'></div>
        <li>
          <div>
            <div class='second_fenlei4'>&middot;</div>
            <div title='Java Java Script J2EE' class='second_fenlei3'>山地车<span class='pot'>...</span>（1816）</div>
          </div>
        </li>
        <div class='clear'></div>

      </ul>
      <div id="divCategoryGoBack" class="categoryGoBack"><a href="#" id="linkCategoryGoBack">返回上级&gt;&gt;</a></div>
    </div>
    </div>
    <div id="recomend_browser"></div>
  </div>
  
  
  <div id="divRight" class="list_right">
    <div class="bluePanel">
 	 <h3><a href="#" class="titleLink" title="搜索结果列表"><span style="color:red;"><s:property value="key" escape="false"></s:property></span>&nbsp;&nbsp;搜索结果列表</a></h3>
 	 <div class="box" style="overflow: hidden;">
    <div class="list_r_line"></div>    
    <div class="clear"></div>
<!--  
  <div class="list_r_list"> <span class="list_r_list_book">
    <a name="link_prd_img" class="book_pic_x" href='#' target="_blank">
    <img  src='http://img30.dangdang.com/4/24/9317290-1_p.jpg' alt='Java编程思想（第4版）'/>
    </a></span>
      <h2><a name="link_prd_name" href='${ctx}/shop/book-detail.action' target="_blank">Java编程思想（第4版）</a> </h2>
      <h3>顾客评分：<img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red2.gif' /></h3>
      <h4 class="list_r_list_h4">作　&nbsp;&nbsp;&nbsp;&nbsp;者：（美）<a target='_blank' href='#' name='作者'>埃克尔</a> 著，<a target='_blank' href='#' name='作者'>陈昊鹏</a> 译</h4>
      <h4>出&nbsp;&nbsp;版&nbsp;&nbsp;社：<a target='_blank' href='#' name='出版社'>机械工业出版社</a></h4>
      <h4>出版时间：2007年06月</h4>
      <h5>本书赢得了全球程序员的广泛赞誉，即使是最晦涩的概念，在Bruce Eckel的文字亲和力和小而直接的编程示例面前也会化解于无形。从Java的基础语法到最高级特性（深入的面向对象概念、多线程、自动项目构建、单...</h5>
      <div class="clear"></div>
      <h6><span class="del">￥108.00</span>　<span class="red">￥86.40</span>　折扣：80折　节省：￥21.60</h6>
      <span class="list_r_list_button"><a name='link_sale' href='javascript:AddToShoppingCart(9317290)'><img src='${ctx}/images/index-img/search/buttom_goumai.gif' onmouseover='this.src="${ctx}/images/index-img/search/buttom_goumai_over.gif"' onmouseout='this.src="${ctx}/images/index-img/search/buttom_goumai.gif"' onmousedown='this.src="${ctx}/images/index-img/search/buttom_goumai_click.gif"' title='购买' /></a></span> <span class="list_r_list_button"><a name="link_favorlist" href='javascript:AddToFavorlist(9317290)'><img src="${ctx}/images/index-img/search/buttom_zancun.gif" onmouseover='this.src="${ctx}/images/index-img/search/buttom_zancun_over.gif"' onmouseout='this.src="${ctx}/images/index-img/search/buttom_zancun.gif"' onmousedown='this.src="${ctx}/images/index-img/search/buttom_zancun_click.gif"' title="放入暂存架"/></a></span> 
    </div>
    <div class="clear"></div>
-->


 <s:if test="bookList !=null || userList !=null">
 <s:if  test="bookList !=null && bookList.pageList !=null">
   <s:iterator value="bookList.pageList" status="itStatus">
    <div class="list_r_list"> <span class="list_r_list_book"><a name="link_prd_img" class="book_pic_x" href="${ctx}/shop/book-detail.action?id=<s:property value='id'/>" target="_blank"><img  src='${ctx}<s:property value="imgPath"/>' alt='<s:property value="bookName" escape="false"/>' style="width:65px;height:90px;"/></a></span>
      <h2><a name="link_prd_name" href="${ctx}/shop/book-detail.action?id=<s:property value='id'/>" target="_blank"><s:property value="bookName" escape="false"/></a> </h2>
      <h3>顾客评分：<img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red2.gif' /></h3>
      <h4>品 牌：<a target='_blank' href='#' name='品牌'><s:property value="isbn" escape="false"/></a></h4>
      <h5><s:if test="content!=null"><s:property value="content" escape="false"/></s:if><s:else>对不起，店主没有对本车评论！</s:else></h5>
      <div class="clear"></div>
      <h6><span class="del">￥<s:property value="origPrice-0" escape="false"></s:property></span>　<span class="red">￥<s:property value="price-0" escape="false"></s:property></span>　节省：￥<s:property value="origPrice-price"/></h6>
      <span class="list_r_list_button">
      	<a name='link_sale' href="javascript:addToShoppingCart('<s:property value="bookId" escape="false" />','1')">
      		<img src='${ctx}/images/index-img/search/buttom_goumai.gif' onmouseover='this.src="${ctx}/images/index-img/search/buttom_goumai_over.gif"' 
      		     onmouseout='this.src="${ctx}/images/index-img/search/buttom_goumai.gif"' onmousedown='this.src="${ctx}/images/index-img/search/buttom_goumai_click.gif"' title='购买' /></a>
      </span> 
      <span class="list_r_list_button">
      	<a name="link_favorlist" href="javascript:addToFavorlist('<s:property value="bookId" escape="false" />','book')">
      		<img src="${ctx}/images/index-img/search/buttom_favorite.gif" onmouseover='this.src="${ctx}/images/index-img/search/buttom_favorite_over.gif"' 
      			 onmouseout='this.src="${ctx}/images/index-img/search/buttom_favorite.gif"' onmousedown='this.src="${ctx}/images/index-img/search/buttom_favorite_click.gif"' title="放入收藏"/></a>
      </span> 
    </div>
    <div class="clear"></div>
   </s:iterator>
 </s:if>
 <!--搜索到得用户信息  -->
 <s:if  test="userList !=null && userList.pageList !=null">
   <s:iterator value="userList.pageList" status="itStatus">
    <div class="list_r_list"> <span class="list_r_list_book"><a name="link_prd_img" class="book_pic_x" href="${ctx}/shop/shop-home.action?id=<s:property value='id'/>" target="_blank"><img  src='${ctx}/images/shop-img/boy.gif' alt='<s:property value="loginId" escape="false"/>'  style="width:65px;height:90px;"/></a></span>
      <h2><a name="link_prd_name" href="${ctx}/shop/shop-home.action?id=<s:property value='id'/>" target="_blank"><s:property value="loginId" escape="false"/></a> </h2>
      <h3>顾客评分：<img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red.gif' /><img src='${ctx}/images/index-img/search/star_red2.gif' /></h3>
      <h4 class="list_r_list_h4">姓　名：<a target='_blank' href='#' name='姓名'><s:property value="name" escape="false"/></a></h4>
      <h4>昵　称：<a target='_blank' href='#' name='昵称'><s:property value="nickName" escape="false"/></a></h4>    
      <h4><span>联系电话：<s:if test="tel != null"><s:property value="tel" escape="false"/></s:if><s:else>无</s:else></span> 
      	  <span style="margin-left:50px;">联 系 QQ：<s:if test="qq!=null"><a href='tencent://message/?uin=<s:property value='qq'/>&Site=顺风车二手车平台&Menu=yes'><img border="0" src='http://wpa.qq.com/pa?p=1:<s:property value='qq'/>:1' /></a></s:if><s:else>无</s:else></span>
      </h4>     
      <h4>注册时间：<s:date name="createTime" format="yyyy'/'M'/'d" /></h4>
      <h5 style="margin-left:90px;"><s:if test="interest != null"><s:property value="interest" escape="false"/></s:if><s:else>主人没有兴趣描述！</s:else></h5>
      <div class="clear"></div>
      <h6>&gt;&gt;加我为好友吧！</h6>
	  <span class="list_r_list_button">
	  	<a name="link_favorlist" href="javascript:addToFavorlist('<s:property value="userId" escape="false" />','user')">
	  		<img src="${ctx}/images/index-img/search/buttom_favorite.gif" onmouseover='this.src="${ctx}/images/index-img/search/buttom_favorite_over.gif"' 
	  			 onmouseout='this.src="${ctx}/images/index-img/search/buttom_favorite.gif"' onmousedown='this.src="${ctx}/images/index-img/search/buttom_favorite_click.gif"' title="加为好友"/></a>
	  </span> 
    </div>
    <div class="clear"></div>
   </s:iterator>
 </s:if>
 </s:if>
 <s:else>
     <div class="list_r_list">
      <h2>对不起，没有您要搜索的内容！</h2>
      <h5>您应该怎么怎么填写关键字，怎么怎么选择范围来检索您需要的信息！</h5>
      <div class="clear"></div> 
    </div>
    <div class="clear"></div>
 </s:else>

<style>

#pagination-clean{
	display:inline-block;
	float:right;
	margin-top:5px;
	margin-right:20px;
	margin-bottom:5px;
	padding:5px 0px 5px 5px;
}
#pagination-clean li{
	display:inline;
	float:left;
	color:#aaa;
	font-size:12px;
	padding:3px 5px;
	margin-left:-1px;
	border:solid 1px #a7a7a7;
}
#pagination-clean li a{
	color:black;
	margin-left:-5px;
	margin-right:-5px;
	padding:3px 7px;
	background-color:#ddd;
}
#pagination-clean li a:hover{
	text-decoration:none;
	background-color:black;
	color:white;
}
</style>
    <div id="divBottomPageNavi" class="fanye_bottom">
        <div class="nextPage">
          <n:page actionUrl="${ctx}/portal/search.action" sumPages="${page.totalPages}" activePage="${page.currentPage}" pageNoKey="niagara_params_pageNo"/>
      	</div>
    </div>
  </div>
  </div>
  <div class="clear"></div>
</div>
</div>
<!--页尾 开始 -->
<!--页尾 end -->

</body>
</html>